<?php
 class M_insert extends CI_Model
 {
	function insert_into_db(){
			$productname = $this->input->post('productname');
			$saleprice = $this->input->post('saleprice');
			$purchaseprice = $this->input->post('purchaseprice');
			$description = $this->input->post('description');
			$image = $this->input->post('image');
			$this->db->query("INSERT INTO msproduct(ProducName,SalePrice,PurchasePrice,Discription,Image) VALUES('".$productname."','$saleprice','$purchaseprice','".$description."','".$image."')");
			$data['errorinsert'] = "6";
			$this->load->view('home',$data); 
	}
   
 }

?>